﻿<%@ Page Language="C#" AutoEventWireup="true" Culture="en-GB" CodeFile="PurchaseRegisterPrint.aspx.cs" Inherits="Main_Reports_Accounts_PurchaseRegisterPrint" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Purchase Registers</title>
    <link href="../../../Styles/accounts.css" rel="stylesheet" type="text/css" />
   

    <script language="javascript" type="text/javascript">
       function prntgrid() {
            var dd = document.getElementById("lnkprint").style.visibility = "hidden";
            window.print();
            this.close();
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div style="margin-top: 20px;">
        <asp:HyperLink ID="lnkprint" runat="server" Text="Print" NavigateUrl="#" onclick="prntgrid();"></asp:HyperLink>
        <center>
            <b>
                <asp:Label ID="lblCompname" runat="server"></asp:Label></b></center>
        <center>
            <b>
                <asp:Label ID="lblMsg" runat="server"></asp:Label></b></center>
        <asp:GridView ID="grdDisplay" Width="100%" runat="server" AutoGenerateColumns="false"
            CssClass="gridview" PageSize="10" ShowFooter="true" RowStyle-CssClass="gridviewitem"
            OnRowDataBound="grdDisplay_RowDataBound" FooterStyle-CssClass="gridviewitem">
            <Columns>
                <asp:TemplateField HeaderText="S.No." ItemStyle-HorizontalAlign="Center">
                    <ItemTemplate>
                         <asp:Label ID="lblsno" runat="server"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField HeaderText="Date" DataField="TransactionDate" DataFormatString="{0:dd-MMM-yyyy}" />
                <asp:BoundField HeaderText="Transaction Type" DataField="Name" />
                <asp:BoundField HeaderText="Voucher No." DataField="transactionnumber" />
                <asp:BoundField HeaderText="Bill No." DataField="ReferenceNumber" />
                <asp:BoundField HeaderText="Particulars" DataField="Particulars" />
                <asp:TemplateField HeaderText="Debit">
                    <ItemStyle HorizontalAlign="Right" />
                    <ItemTemplate>
                        <asp:Label ID="lblDebit" runat="server"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Credit">
                    <ItemStyle HorizontalAlign="Right" />
                    <ItemTemplate>
                        <asp:Label ID="lblCredit" runat="server"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <EmptyDataRowStyle ForeColor="Red" Font-Bold="true" HorizontalAlign="Center" />
            <EmptyDataTemplate>
                NO RECORD TO PRINT !
            </EmptyDataTemplate>
        </asp:GridView>
    </div>
    </form>
</body>
</html>
